package com.zl.dao
{
	import com.zl.bean.KnowledgeLibBean;
	import com.zl.net.MyRoFactory;
	
	import mx.controls.Alert;
	public class KnowledgeLibDao
	{
		public function KnowledgeLibDao()
		{
		}
		
		public function insert(bean:KnowledgeLibBean, resultHandler:Function):void{
			MyRoFactory.getInstance().callFunction('knowledgeLibRo', resultHandler, '添加知识库', 'insert', bean);
		}
		
		public function getCountByCondition(title:String, keyWord:String, productName:String, resultHandler:Function):void{
			MyRoFactory.getInstance().callFunction('knowledgeLibRo', resultHandler, '查询知识库', 
				'getCountByCondition', title, keyWord, productName);
		}
		
		public function getInfoByCondition(title:String, keyWord:String, productName:String, pageNo:int, pageSize:int, resultHandler:Function):void{
			MyRoFactory.getInstance().callFunction('knowledgeLibRo', resultHandler, '查询知识库', 
				'getInfoByCondition', title, keyWord, productName,pageNo, pageSize);
		}
		
		public function deleteById(id:int, resultHandler:Function):void{
			MyRoFactory.getInstance().callFunction('knowledgeLibRo', resultHandler, '删除一条记录', 
				'deleteById',id);
		}
		
		
	}
}